<!DOCTYPE html>
<html>
    <head></head>
    <body>
        <button id="btn">回调函数与钩子函数的区别</button>
        <script>
            const btn = document.getElementById("btn");
            btn,addEventListener('click', () => {
                console.log("回调函数");
            })
            btn.onclick = () => {
                console.log("钩子函数");
            }

        </script>
    </body>
</html>